package nuc.ss.wl.service.impl;

import nuc.ss.wl.dao.CourseDao;
import nuc.ss.wl.dao.impl.CourseDaoImpl;
import nuc.ss.wl.entity.Course;
import nuc.ss.wl.service.CourseService;

import java.util.List;

public class CourseServiceImpl implements CourseService {
    CourseDao cd = new CourseDaoImpl();
    @Override
    public int add(Course course) {
        return cd.save(course);
    }

    @Override
    public List<Course> findAll() {
        return cd.findAll();
    }

    @Override
    public int delete(int cno) {
        return cd.delete(cno);
    }

    @Override
    public Course findById(int cno) {
        return cd.findById(cno);
    }

    @Override
    public Course findByCname(String cname) {
        return cd.findByCname(cname);
    }

    @Override
    public int update(Course course) {
        return cd.update(course);
    }
}
